package com.cskaoyan.day1.datastructure;

/**
 * @author Common-zhou
 * @since 2023-02-27 16:20
 */
public class NodeUtil {
    public static void printNode(Node<?> node) {
        while (node != null) {
            if (node.next != null) {
                System.out.printf(node.data + "-->");
            } else {
                System.out.println(node.data);
            }
            node = node.next;
        }
    }
}
